<?php
/**
 * 配置文件－－主配置文件
 * @package main
 * @subpackage configure
 * @author 张立冰 <roast@php.net>
 * @version 0.1 20071031
 * 
 * $Id: application.cfg.php 9 2011-02-23 06:56:47Z sbnnest@gmail.com $
 */

//调试开关
define('DEBUG', true);

//当前发布的静态压缩的文件版本号
define('MIN_VERSION', 1);

//设置时区
date_default_timezone_set('Etc/GMT0');

//在线活动时间长度,单位：秒
define('ONLINE_TIME_GAP', 600);

//统一分页长度
define('PAGE_NAV_SIZE', 8);

//初始化配置变量
$cfg = array();

$cfg['path']['conf'] = dirname(__FILE__) . '/';
$cfg['path']['root'] = dirname($cfg['path']['conf']) . '/';
$cfg['path']['xml'] = $cfg['path']['root'] . 'xml/';

//语言
$cfg['lang'] = 'Us';

//社区首页
$cfg['url']['root'] = 'http://vps1.hiadmin.com/';

$cfg['site']['title'] = '热血球球';

$cfg['app']['name'] = 'winninggoalfootball';

//facebook相关配置
$cfg['facebook'] = array
(
	'key' 		=> 'dd42f9059a12d9e42e7e6f61873902a4',
	'secret'	=> '84e53ea539105c139fc87a2bd095827c'
);

//联赛时间配置表
$cfg['league'] = array
(
	'time' => array('09:00:00', '15:20:00', '16:50:00', '18:20:00', '19:50:00'),
	'hour' => array('9', '15', '16', '18', '19')
);

//加载数据库配置文件
include($cfg['path']['conf'] .'database.cfg.php');

//页面信息
$cfg['page'] = array
(
	'charset'			=> 'UTF-8',
	'contentType'		=> 'text/html',
	'title'			=> '',
	'cached'			=> true,
	'engine'			=> 'smarty',
	'css'				=> array(),
	'js'				=> array(),
);
	
//风格
$cfg['theme'] = array
(
	'root'			=> '',
	'current'			=> '',
);
	
//其他路径
$cfg['path'] = array_merge($cfg['path'], array
	(
	'lib'				=> $cfg['path']['root'] . 'lib/',
	'class'			=> $cfg['path']['root'] . 'lib/',
	'common'			=> $cfg['path']['root'] . 'lib/',
	'cache'			=> $cfg['path']['root'] . 'cache/',
	'upload'			=> $cfg['path']['root'] . 'public/upload/',
	'fonts'			=> $cfg['path']['root'] . 'public/fonts/',
	'temp'			=> $cfg['path']['root'] . 'public/temp/',
	'module'		=> $cfg['path']['root'] . 'modules/',
	)
);
    	
//URL设置
$cfg['url'] = array_merge($cfg['url'], array
	(
	'js'				=> $cfg['url']['root'] . 'public/js/',
	'css'				=> $cfg['url']['root'] . 'public/css/',
	'images'			=> $cfg['url']['root'] . 'public/images/',
	'theme'			    => $cfg['url']['root'] . 'public/theme/',
	
	//二版新加
	'style'				=> $cfg['url']['root'] . 'public/style/',
	'image'		    	=> $cfg['url']['root'] . 'public/image/',
	'guild_theme'       => $cfg['url']['root'] . 'public/guild/'
	)
);
  
//Smarty
$cfg['smarty'] = array
(
	'template_dir'	=> $cfg['path']['root'] . $cfg['theme']['current'] . 'templates/',
	'compile_dir'		=> $cfg['path']['cache'] . 'smarty/',
	'left_delimiter'	=> '{',
	'right_delimiter'	=> '}',
);
    
//cache
$cfg['cache'] = array
(
	'root'			=> $cfg['path']['cache'],  // engine=memcached 时为服务器地址 
	'engine'			=> 'file', //file|memcached
	'port'			=> 11211, //engine=memcached 时才有意义 
	'timeout'			=> 60, //engine=memcached 时才有意义 
);
?>